package com.flight.trans.adapter;

import android.content.Context;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.flight.trans.R;
import com.flight.trans.base.BaseRecyclerAdapter;
import com.flight.trans.base.BaseViewHolder;
import com.flight.trans.bean.LeavePorWeighingDetailsBean.LeavePorWeighingDetailsData.OrderBean;

import java.util.List;

/**
 * 出港称重
 */
public class LeavePorWeighingDetailsAdapter extends BaseRecyclerAdapter<OrderBean> {

    private boolean IsDone ;

    public LeavePorWeighingDetailsAdapter(Context mContext, List<OrderBean> mList) {
        super(mContext, mList);
        this.IsDone = IsDone ;
    }

    @Override
    public int setContentView() {
        return R.layout.adapter_leave_port_weighting_details;
    }

    @Override
    protected void bindData(BaseViewHolder holder, OrderBean data, int position) {
        TextView mTvOrderNo = holder.findViewById(R.id.mTvOrderNo);//运单号
        TextView mTvFlightNo = holder.findViewById(R.id.mTvFlightNo);//航班号
        TextView mTvDeep = holder.findViewById(R.id.mTvDeep);//目的地
        TextView mTvOrderCount = holder.findViewById(R.id.mTvOrderCount);//运单件数
        TextView mTvOrderWeight = holder.findViewById(R.id.mTvOrderWeight);//运单重量
        TextView mTvProductName = holder.findViewById(R.id.mTvProductName);//品名
        TextView mTvSender = holder.findViewById(R.id.mTvSender);//发货人

        mTvOrderNo.setText(data.getOrderNo());
        mTvFlightNo.setText(data.getFlightNo2());
        mTvDeep.setText(data.getDeap());
        mTvOrderCount.setText(String.valueOf(data.getNumber()));
        mTvOrderWeight.setText(String.valueOf(data.getWeight()));
        mTvProductName.setText(String.valueOf(data.getTradeName()));
        mTvSender.setText(data.getSenderName());
    }
}
